<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="锚点定位实现的纯CSS选项卡切换效果" />
    <meta name="keywords" content="选项卡, 锚点定位, 跳转, 锚点" />
    <title>锚点与内容显示测试</title>
    <style type="text/css">
        .box {
            width: 200px;
            height: 100px;
            border: 1px solid #ddd;
            overflow: hidden;
        }

        .list {
            width: 200px;
            height: 100px;
            line-height: 100px;
            background: #ddd;
            font-size: 80px;
            text-align: center;
        }

        .link {
            width: 200px;
            padding-top: 10px;
            text-align: right;
        }

        .click {
            display: inline-block;
            width: 20px;
            height: 20px;
            line-height: 20px;
            border: 1px solid #ccc;
            background: #f7f7f7;
            color: #333;
            font-size: 12px;
            font-weight: bold;
            text-align: center;
            text-decoration: none;
        }

        .click:hover {
            background: #eee;
            color: #345;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="list" id="one">1</div>
        <div class="list" id="two">2</div>
        <div class="list" id="three">3</div>
        <div class="list" id="four">4</div>
    </div>
    <div class="link">
        <a class="click" href="#one">1</a>
        <a class="click" href="#two">2</a>
        <a class="click" href="#three">3</a>
        <a class="click" href="#four">4</a>
    </div>
    <script>
        var _hmt = _hmt || [];
// (function() {
//   var hm = document.createElement("script");
//   hm.src = "https://hm.baidu.com/hm.js?48d8e938d5365a4cb0fc9e65d945018e";
//   var s = document.getElementsByTagName("script")[0];
//   s.parentNode.insertBefore(hm, s);
// })();
    </script>
</body>

</html>